﻿//-----------------------------------------------------------------------
// <copyright file="Relation.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Relation class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Markup;
    using Collections;

    /// <summary>
    /// Represents a relation within the runtime model.
    /// </summary>
    [ContentProperty("Indexes")]
    public class Relation : ElementBase
    {
        /// <summary>
        /// Initializes a new instance of the Relation class.
        /// </summary>
        public Relation()
        {
            this.Indexes = new Indexes();
        }

        /// <summary>
        /// Gets the indexes on the relation.
        /// </summary>
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public IList<Index> Indexes { get; private set; }

        /// <summary>
        /// Gets or sets the tuple definition reference of the relation.
        /// </summary>
        public string TupleRef { get; set; }

        /// <summary>
        /// Gets or sets the ID of the relation.
        /// </summary>
        public int Id { get; set; }
    }
}
